<style scoped>
h1{
    font-size:24px;
}
</style>
<template>
  <div class="head">
    <h1>{{name}}</h1>
  </div>
</template>

<script>
export default {
    data:()=>({
        name:'xxx'
    }),
    created(){
        this.name = this.$route.name
    }
};
</script>